<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="./js/layui/css/layui.css">
	</head>
	<body>
		<fieldset id="">
			<legend>表格数据维护</legend>
			<div class="layui-field-box">
				<!-- <form class="layui-form" action=""> -->
					<div class="layui-form-item">
						<label class="layui-form-label">姓名</label>
						<div class="layui-input-inline">
							<input type="text" name="name2"  placeholder="请输入姓名"
								autocomplete="off" class="layui-input">
						</div>
					<input type="button" name="" id="" value="搜索" class="layui-btn"/>
					<!-- <input type="button" name="" id="" value="添加" class="layui-btn"/> -->
					<button type="button" class="layui-btn">添加</button>
					</div>
				<!-- </form> -->
			</div>
				<table style="width=60% ;"class=" layui-table">
					<thead>
						<tr>
							<th style="width: 15%; text-align: left;">ID</th>
							<th style="width: 15%; text-align: left;">姓名</th>
							<th style="width: 15%; text-align: left;">年龄</th>
							<th style="width: 15%; text-align: left;">生日</th>
							<th style="width: 15%; text-align: left;">操作</th>
						</tr>
					</thead>
					<tbody id="tbody">

					</tbody>
				</table>
		</fieldset>
		<script type="text/html" id = 'testa'>
			<form action="" class="layui-form">
				
				<div class="layui-form-item">
					<label class="layui-form-label">姓名</label>
					<div class="layui-input-inline">
						<input type="text" name="name1" required lay-verify = "required"  placeholder="请输入姓名"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">年龄</label>
					<div class="layui-input-inline">
						<input type="text" name="age" required lay-verify = "required"  placeholder="请输入年龄"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">生日</label>
					<div class="layui-input-inline">
						<input type="text" name="birth" id="birth" required lay-verify = "required"  placeholder="请输入生日"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-input-block">
					<input type="button"   value="确定" class="layui-btn" />
					<input type="reset"  value="重置" class="layui-btn layui-btn-primary" />
					<input type="button"  class="layui-btn"  value="关闭" />
				</div>
				
			</form>
		</script>
		<script type="text/html" id="tradd">
			<tr id="tr{{d.id}}">
				<td id="tda{{d.id}}">{{d.id}}</td>
				<td id="tdb{{d.id}}">{{d.name}}</td>
				<td id="tdc{{d.id}}">{{d.age}}</td>
				<td id="tdd{{d.id}}">{{d.birth}}</td>
				<td id="tde{{d.id}}">
					<a href="javascript:del({{d.id}});" 
					class="layui-btn layui-btn-xs layui-btn-danger">
					<i class="layui-icon layui-icon-delete"></i>
					</a>
					<a href="javascript:upd({{d.id}});" class="layui-btn layui-btn-xs">修改</a>
				</td>
			</tr>
		</script>
		<script src="js/jquery-3.6.0.min.js"></script>
		<script src="js/layui/layui.js"></script>
		<script type="text/javascript" src="js/layui1.js"></script>
	</body>
</html>
